﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="EstiloCerrar" BasedOn="{x:Null}" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="TimelineMouseOver">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.BitmapEffect).(OuterGlowBitmapEffect.Opacity)">
								<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="TimelineMouseOut">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.BitmapEffect).(OuterGlowBitmapEffect.Opacity)">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
								<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid>
						<Rectangle Fill="{DynamicResource ElementoCerrar}" Stroke="{x:Null}" x:Name="rectangle">
							<Rectangle.BitmapEffect>
								<OuterGlowBitmapEffect GlowColor="#aaaaaaaa" GlowSize="3" Opacity="0"/>
							</Rectangle.BitmapEffect>
						</Rectangle>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True"/>
						<Trigger Property="IsDefaulted" Value="True"/>
						<Trigger Property="IsMouseOver" Value="True">
							<Trigger.EnterActions>
								<BeginStoryboard Storyboard="{StaticResource TimelineMouseOver}"/>
							</Trigger.EnterActions>
							<Trigger.ExitActions>
								<BeginStoryboard x:Name="TimelineMouseOut_BeginStoryboard" Storyboard="{StaticResource TimelineMouseOut}"/>
							</Trigger.ExitActions>
							<Setter Property="BitmapEffect" TargetName="rectangle">
								<Setter.Value>
									<OuterGlowBitmapEffect GlowColor="#aaaaaaaa" GlowSize="3" Opacity="0"/>
								</Setter.Value>
							</Setter>
						</Trigger>
						<Trigger Property="IsPressed" Value="True"/>
						<Trigger Property="IsEnabled" Value="False"/>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="BotonNormal" BasedOn="{x:Null}" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="TimelinePresionado">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="TimelineNormal">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid>
						<Rectangle Opacity="1" Stroke="#FF949494" RadiusX="12" RadiusY="12" x:Name="rectangle">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0.5,-0.125" StartPoint="0.5,1.083">
									<GradientStop Color="#FFB4B4B4" Offset="0"/>
									<GradientStop Color="#FFFFFFFF" Offset="1"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True"/>
						<Trigger Property="IsDefaulted" Value="True"/>
						<Trigger Property="IsMouseOver" Value="True"/>
						<Trigger Property="IsPressed" Value="True">
							<Trigger.EnterActions>
								<BeginStoryboard Storyboard="{StaticResource TimelinePresionado}"/>
							</Trigger.EnterActions>
							<Trigger.ExitActions>
								<BeginStoryboard x:Name="TimelineNormal_BeginStoryboard" Storyboard="{StaticResource TimelineNormal}"/>
							</Trigger.ExitActions>
						</Trigger>
						<Trigger Property="IsEnabled" Value="False"/>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="CloseWindow" BasedOn="{x:Null}" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<Rectangle Fill="{DynamicResource ElementoCerrar2}" Stroke="{x:Null}"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True"/>
						<Trigger Property="IsDefaulted" Value="True"/>
						<Trigger Property="IsMouseOver" Value="True"/>
						<Trigger Property="IsPressed" Value="True"/>
						<Trigger Property="IsEnabled" Value="False"/>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>